import java.io.File;
import java.io.FileReader;
import java.io.IOException;

public class FileReaderAscii {

	private static String text;

	public static void ladeDatei(String datName) {

		File file = new File(datName);

		if (!file.canRead() || !file.isFile())
			System.exit(0);

		FileReader fr = null;
		int c;
		StringBuffer buff = new StringBuffer();
		try {
			fr = new FileReader(file);
			while ((c = fr.read()) != -1) {
				buff.append((char) c);
			}
			fr.close();

		} catch (IOException e) {
			e.printStackTrace();
		}
		text = buff.toString();

	}

	public static String getText() {

		return text;
	}

}